import loading from './index.vue'
const loadingPlugin = {
  install (Vue) {
    const TemplateClass = Vue.extend(loading)
    const loadingComponent = new TemplateClass()
    // console.log(loadingComponent.$mount());
    document.body.appendChild(loadingComponent.$mount().$el)
    Vue.prototype.$showLoading = () => {
      loadingComponent.isShow = true
    }
    Vue.prototype.$hideLoading = () => {
      loadingComponent.isShow = false
    }
  }
}
export default loadingPlugin
